#!/usr/bin/env node
const service = require('./vue-cli-service')
const childProcess = require('child_process')
const renderOxlint = () => {
  childProcess.exec('npx oxlint@latest', (e, res) => {
    console.log('ox-lint', res);
    console.log('ready');
  })
}
service().then(result => {
  console.log('开始进行检查代码规范');
  if (result && result.server) {  // <--- server started successfully if result.server exists
    const {server, url} = result;
    renderOxlint()
    // childProcess.exec('nodemon', (i, res)=> {
    //   console.log('ox-lint', res);
    //   console.log('ready');
    // })
  }
})
